package com.Pure;

import android.graphics.Point;

import com.e3roid.drawable.*;

public abstract class PureGameObject{
	protected Sprite sprite;
	//default true, set ture will make light can not pass
	public boolean isBlockLight;
	
	public PureGameObject(Sprite sprite)
	{
		this.sprite = sprite;
		this.isBlockLight = true;
	}
	public Sprite getSprite()
	{
		return sprite;
	}
	//default light event handle: block the light
	//return value represents light direction changing(reflection).
	public PureLightDirection onLightCollide(PureGrid grid,Point lightFrom,Point lightEnd,
			int lengthOfLight,PureLightDirection lightFromDir)
	{
		grid.generateLightWay(lightFrom,lengthOfLight,lightFromDir);
		return PureLightDirection.LD_NONE;
	}
	public Point getPosition()
	{
		return new Point(sprite.getRealX(),sprite.getRealY());
	}

}
